package com.example.teaching_server.entity;

/**
 * 活动类型枚举
 * 定义系统支持的活动类型
 */
public enum ActivityType {

    COURSE("课程"),
    MEETING("会议"),
    EXAM("考试"),
    ACTIVITY("活动");

    private final String description;

    ActivityType(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public static ActivityType fromName(String name) {
        for (ActivityType type : ActivityType.values()) {
            if (type.name().equalsIgnoreCase(name)) {
                return type;
            }
        }
        return null;
    }
}
